import { createRouter, RouteRecordRaw, createWebHistory } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    component: () => import('@/views/Index.vue')
  },
  {
    path: '/login',
    component: () => import('@/views/Login.vue')
  },
  {
    path: '/register',
    component: () => import('@/views/Register.vue'),
  },
  {
    path: '/user',
    components: {
      default: () => import('@/views/User1.vue'),
      user2: () => import('@/views/User2.vue')
    }
  }

]

export default createRouter({
  history: createWebHistory(),
  routes
})
